home *** CD-ROM | disk | FTP | other *** search
/ Komputer for Alle 2002 #4 / K-CD-4-2002.ISO / Empire Earth / EEDemo.exe / Disk1 / data.ssa / unit ai scripts_healer.tai < prev    next >
Encoding:
Text File  |  2001-09-29  |  1.9 KB  |  57 lines

  1. //
  2. // Auto-healing behavior.
  3. //
  4. // After a HealUnit goal is completed, the unit should enter the LookForUnitToHeal state.
  5. // 
  6. // Player right clicks to Order the Priest to heal that unit
  7. // If the target unit is not currently within the healing radius of the Priest - the Priest will move to get him within it's radius
  8. // If a unit should die before the Priest reaches it for healing, the Priest should stop movement
  9. //
  10. // Smart Healing
  11. // If a eligible damaged unit should be within a Priest healing radius it will automatically be healed
  12. // When a Priest completes healing a unit it will search it's LOS and it will then begin healing the closest damaged unit.  The Priest may move to get this unit into it's Healing Range
  13. // If there is no eligible damaged unit within LOS, the Priest should go idle.
  14. // If a damaged unit is 1. within LOS but 2. outside of healing radius and 3. the Priest is currently idle it will not move to heal that unit.  
  15.  
  16. Idle
  17. {
  18.     HealSearchTimeElapsed true(LookForHealee)
  19. }
  20.  
  21. LookForEnemies
  22. {
  23.     AttackMoveEnabled true(LookForHealee)
  24. }
  25.  
  26. LookForHealee
  27. {
  28.     GoalIsHeal true(TurnToFaceHealee)
  29.     GoalIsLocation true(Advance) false(ShouldIReturnToInitialContactLocation)
  30. }
  31.  
  32. TurnToFaceHealee
  33. {
  34.     anyof(HealeeDestroyed,UnitNotOnMap,HealeeNoLongerVisible) true(ShouldIReturnToInitialContactLocation)
  35.     HealeeInHealingRange false(PrepareToMove)
  36.     FacingHealee true(HealUnit)
  37. }
  38.  
  39. HealUnit         
  40. {
  41.     TargetNeedsHealing false(ShouldIReturnToInitialContactLocation)
  42.     anyof(HealeeDestroyed,UnitNotOnMap,HealeeNoLongerVisible) true(ShouldIReturnToInitialContactLocation)
  43.     HealeeInHealingRange false(PrepareToMove)
  44. }
  45.  
  46. GetNextMoveWaypoint
  47. {
  48.     HealeeInHealingRange true(TurnToFaceHealee)
  49. //    allof(NextWaypointRetrieved,AttackMoveEnabled) true(LookForHealee) 
  50. }
  51.  
  52. // Shouldn't interfere with the priest reacquire when converting
  53. ReacquireGoal
  54. {
  55.     GoalIsHeal true(TurnToFaceHealee)
  56. }
  57.